package com.zhuiyun.project.cyclingapplet.service.impl;

import com.zhuiyun.project.cyclingapplet.entity.Review;
import com.zhuiyun.project.cyclingapplet.mapper.ReviewMapper;
import com.zhuiyun.project.cyclingapplet.service.IReviewService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author guojingzhi
 * @since 2024-07-16
 */
@Service
public class ReviewServiceImpl extends ServiceImpl<ReviewMapper, Review> implements IReviewService {

    @Resource
    ReviewMapper reviewMapper;

    /**
     * 根据活动id查询评论条数以及评论分数
     * @param activityId
     * @return
     */@Override
    public Review selectByactivityId(Integer activityId) {
        Review review = reviewMapper.selectByactivityId(activityId);
        return review;
    }
}
